<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>                            //绝对过期时间
         //document.cookie = "uesrname = dog;expire=Thu, 18 Dec 2025 12:00:00 GMT"
         
        document.cookie = "uesrname = dog;max-age=7"//相对过期时间 单位秒
    </script>
</body>
</html>